﻿/// Copyright (c) Microsoft Corporation.  All rights reserved.
using System;
using Microsoft.TeamFoundation.Build.Client;

namespace Tcvt.Packages
{
    internal class BuildAgent
    {
        #region Constants
        private const int DEFAULT_WEIGHT = 100;
        #endregion

        #region Private Fields
        private string _name;
        private string _dropFolder = "";
        private IBuildController _tfsBuildAgent;
        private int _weight = DEFAULT_WEIGHT;
        private string _priority = "";
        #endregion

        #region Constructors
        public BuildAgent()
        {
            _name = string.Empty;
            _dropFolder = string.Empty;
            _tfsBuildAgent = null;
        }

        public BuildAgent(string name, string dropFolder)
        {
            _name = name;
            _dropFolder = dropFolder;
            _tfsBuildAgent = null;
        }

        public BuildAgent(string name, string dropFolder, int weight)
        {
            _name = name;
            _dropFolder = dropFolder;
            _weight = weight;
            _tfsBuildAgent = null;
        }
        #endregion

        #region Public Properties
        public string Name
        {
            get
            {
                return _name;
            }
            set
            {
                _name = value;
            }
        }

        public string DropFolder
        {
            get
            {
                return _dropFolder;
            }
            set
            {
                _dropFolder = value;
            }
        }

        public IBuildController TfsBuildAgent
        {
            get
            {
                return _tfsBuildAgent;
            }
            set
            {
                _tfsBuildAgent = value;
            }
        }

        public int Weight
        {
            get
            {
                return _weight;
            }
            set
            {
                _weight = value;
            }
        }

        public string Priority
        {
            get
            {
                return _priority;
            }
            set
            {
                _priority = value;
            }
        }
        #endregion
    }
}
